#tuple
Description: Convert a value to type tuple
.
def tuple(x):
'''
Convert a value to tuple
:param x: a variable
:return: the value converted to tuple
'''
Example:
print(tuple([1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6]))
About 438 letters
About 2 minutes
Description: Convert a value to type tuple
.
def tuple(x):
'''
Convert a value to tuple
:param x: a variable
:return: the value converted to tuple
'''
Example:
print(tuple([1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6]))
Created in 6/9/2025
Updated in 6/9/2025